<template>
	<view>
		<template v-if="data">
		<view class="formModel">
			<view class="cu-form-group">
				<view class="title">养殖场名</view>
				<input :placeholder="data.farm_name" disabled='true' name="input"></input>
			</view>
			<view class="cu-form-group">
				<view class="title">被指导人</view>
				<input :placeholder="data.faeces_perpel" disabled='true' name="input"></input>
			</view>
			<view class="cu-form-group">
				<view class="title">处理方式</view>
				<input :placeholder="data.faeces_handle" disabled='true' name="input"></input>
			</view>
			<template v-if="data.faeces_handle==='第三方处理'">
				<view class="cu-form-group">
				<view class="title">第三方公司名</view>
				<input :placeholder="data.faeces_organization" disabled='true' name="input"></input>
			</view>
			<view class="cu-form-group">
				<view class="title">第三方联系方式</view>
				<input :placeholder="data.Dfaeces_phone" disabled='true' name="input"></input>
			</view>
			<view class="cu-form-group">
				<view class="title">运收周期（天）</view>
				<input :placeholder="data.faeces_collector_cycle" disabled='true' name="input"></input>
			</view>
			</template>
			
			<view class="cu-form-group">
				<view class="title">指导人</view>
				<input :placeholder="data.user_name" disabled='true' name="input"></input>
			</view>
			<view class="cu-form-group">
				<view class="title">联系方式</view>
				<input :placeholder="data.faeces_phone" disabled='true' name="input"></input>
			</view>
		</view>
		</template>
		<template v-else>
			<view class="nothing">
				<image src="../../../static/common/nofenwu.png" mode="widthFix"></image>
			</view>
		</template>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				data:''
			}
		},
		onReady() {
			this.getFaeceDispose()
			console.log(this.User.userInfo.farm_id)
		},
		methods:{
			getFaeceDispose(){
				uni.request({
					url:this.confige.webUrl+"/sysFaeces/getId",
					data:{
						farm_id:this.User.userInfo.farm_id
					},
					header:{
						'X-Token':this.User.token
					},
					success: (res) => {
						// console.log(res)
						this.data = res.data.result[0]
					}
				})
			}
		}
	}
</script>

<style lang="less" scoped>
	@import "../../../common/main.css";
	@import "../../../common/colorui/icon.css";
	@import "../../../common/global.less";
	.nothing{
		height:80vh;
		 // background-color: #FFFFFF;
			image{
				 width: 65%;
				 height:65%;
			}
		 display: flex;
		 justify-content: center;
		 align-items: center;
	}
	.formModel{
	background-color:@backcolorthree;
	border-bottom:2rpx solid #eaeaea;
	.cu-form-group {
	.title {min-width: calc(4em + 15px);}		
	}
	}
	
</style>
